package com.zzsz.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zzsz.common.annotation.Excel;
import com.zzsz.common.core.domain.BaseEntity;

/**
 * 库存操作日志对象 zzsz_stock_operation_log
 *
 * @author ruoyi
 * @date 2025-09-03
 */
public class ZzszStockOperationLog extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long id;

    /** 商品ID */
    @Excel(name = "商品ID")
    private Long productId;

    /** 数量 */
    @Excel(name = "数量")
    private Long count;

    /** 操作类型 (IN_STOCK / OUT_STOCK) */
    @Excel(name = "操作类型 (IN_STOCK / OUT_STOCK)")
    private String operationType;

    /** 操作状态 (SUCCESS / FAILED) */
    @Excel(name = "操作状态 (SUCCESS / FAILED)")
    private String status;

    /** 操作人 */
    @Excel(name = "操作人")
    private String operator;

    /** 操作时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "操作时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date operateTime;

    /** 失败原因（可选） */
    @Excel(name = "失败原因", readConverterExp = "可=选")
    private String errorMsg;

    /** 描述 */
    @Excel(name = "描述")
    private String description;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }

    public void setProductId(Long productId)
    {
        this.productId = productId;
    }

    public Long getProductId()
    {
        return productId;
    }

    public void setCount(Long count)
    {
        this.count = count;
    }

    public Long getCount()
    {
        return count;
    }

    public void setOperationType(String operationType)
    {
        this.operationType = operationType;
    }

    public String getOperationType()
    {
        return operationType;
    }

    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getStatus()
    {
        return status;
    }

    public void setOperator(String operator)
    {
        this.operator = operator;
    }

    public String getOperator()
    {
        return operator;
    }

    public void setOperateTime(Date operateTime)
    {
        this.operateTime = operateTime;
    }

    public Date getOperateTime()
    {
        return operateTime;
    }

    public void setErrorMsg(String errorMsg)
    {
        this.errorMsg = errorMsg;
    }

    public String getErrorMsg()
    {
        return errorMsg;
    }

    public void setDescription(String description)
    {
        this.description = description;
    }

    public String getDescription()
    {
        return description;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("productId", getProductId())
                .append("count", getCount())
                .append("operationType", getOperationType())
                .append("status", getStatus())
                .append("operator", getOperator())
                .append("operateTime", getOperateTime())
                .append("errorMsg", getErrorMsg())
                .append("description", getDescription())
                .toString();
    }
}
